<template>
  <div class="school-form">
    <div class="paddLR content re">
      <div class="htit font30">申请报名</div>
      <div class="con">为了不耽误您的报名，请务必正确填写您的信息并 保持电话畅通，我们的专业留学顾问会尽快与您联 系，带*为必填项。</div>
    </div>
    <div class="div w3-form rd20 box">
      <el-form :model="form" label-width="100px">
        <dl>
          <dd class="flex-bect dd">
            <el-input placeholder="* 请输入学生中文姓名" class="w100" v-model="form.name"></el-input>
          </dd>
          <dd class="flex-bect dd">
            <el-input placeholder="* 请输入您的手机号码" class="w100" v-model="form.mobile"></el-input>
          </dd>
          <dd class="flex-bect dd">
            <el-input placeholder="请输入您的QQ/微信号码" class="w100" v-model="form.wx"></el-input>
          </dd>
          <dd class="flex-bect dd">
            <el-input placeholder="请输入您的出生日期" class="w100" v-model="form.extColumn1"></el-input>
          </dd>
          <dd class="flex-bect dd">
            <el-select v-model="form.extColumn12" class="w100" placeholder="请选择您想去的留学国家">
              <el-option v-for="item in countryList" :key="item.id" :label="item.name" :value="item.name"></el-option>
            </el-select>
          </dd>
        </dl>
        <span class="submit flex-ct rd10 aniBtn" @click="onSubmit">立即报名抢留学名额</span>
      </el-form>
    </div>
    <!-- <div class="bottom-copy flex-ct">
      <div class="div">
        <div class="p">联系电话：<span class="sp">{{info.tel}}</span></div>
        <div class="p">版权所有：{{info.company}}</div>
      </div>
    </div> -->
  </div>
</template>

<script>
// 不支持 import
module.exports = {
  data: function () {
    return {
      form:{
        name:'',
        birthday:'',
        mobile:'',
        wx:"",
      },
      countryList:[
        {name:'美国',id:1},
        {name:'英国',id:2}
      ],
      info:info()
    };
  },
  components: {},
  mounted(){
    get("guojia").then(res=>{this.countryList=res[0].list;})
  },

  methods:{
    onSubmit(){
       let data = this.form ;
       console.log()
      // if(data.class === '' || data.class1 === '') return err(this,'留学班级不能为空！');
      if(data.name == '')  this.$message.error('学生姓名不能为空！')
      if(data.mobile == '') this.$message.error('手机号不能为空！')
      if(data.extColumn1 == '') this.$message.error('出生日期不能为空！')
      if(data.extColumn12 == '') this.$message.error('留学国家不能为空')
         formpost("index/hkldy",this.form).then(res=>{
        this.$message.success('提交成功')
            })
    }
  }
};
</script>

<style>
.el-message--error{top:50px !important;z-index:9999999 !important;}
</style>